/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ants;

import java.awt.Point;
import java.io.Serializable;

/**
 *
 * @author squirrel
 * 
 * Esta clase es la que va a conetener varias tiles
 * 
 */
public class Perspective implements Serializable{
    public Tile[][] tiles;
    public int Antid;
    public int Sicomida;
    public boolean movil;
   static final long serialVersionUID = 8268056631240629611L;
    
    public Perspective(Ant hormiga, Mapa m){
        tiles = new Tile[3][3];
        
        Antid = hormiga.id; 
        if(hormiga.type == 2){
            if(hormiga.food > 0){ 
                Sicomida = 1;
            }
            else{
                Sicomida= 0;
                
            }
        }
        Point coordenada = hormiga.place;
        for(int x = 0; x < 9; x++) {
            tiles[(int)(x/3)][x%3] = new Tile(m.cells[coordenada.x+((int)(x/3))-1][coordenada.y+(x%3)-1]); 
        }
    }
}